using Mark.Models;
using MarkFileInfo = Mark.Models.FileInfo;

namespace Mark.Services.Interfaces;

/// <summary>
/// 聊天服务接口
/// </summary>
public interface IChatService
{
    // 对话管理
    Task<Conversation> CreateConversationAsync(string userId, string title, string? description = null);
    Task<Conversation?> GetConversationAsync(string conversationId);
    Task<IEnumerable<Conversation>> GetUserConversationsAsync(string userId);
    Task<bool> UpdateConversationAsync(string conversationId, string title, string? description = null);
    Task<bool> DeleteConversationAsync(string conversationId);
    
    // 消息管理
    Task<Message> SendMessageAsync(string conversationId, string content, string role = "user", string? modelId = null);
    Task<Message?> GetMessageAsync(string messageId);
    Task<IEnumerable<Message>> GetConversationMessagesAsync(string conversationId);
    Task<bool> UpdateMessageAsync(string messageId, string content);
    Task<bool> DeleteMessageAsync(string messageId);
    
    // AI 响应生成
    Task<Message> GenerateResponseAsync(string conversationId, string modelId);
    
    // 文件管理
    Task<MarkFileInfo> UploadFileAsync(string userId, Stream fileStream, string fileName, string mimeType);
    Task<bool> AttachFileToMessageAsync(string messageId, string fileInfoId, string role = "attachment");
    Task<IEnumerable<MarkFileInfo>> GetMessageFilesAsync(string messageId);
} 